package cn.csxw.openchina.ui.adapter;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.ArrayList;

import butterknife.BindView;
import cn.csxw.openchina.R;
import cn.csxw.openchina.base.BaseRecAdapter;
import cn.csxw.openchina.entity.bean.ActiveBean;
import cn.csxw.openchina.utils.Global;

/**
 * 发现---》好友圈
 */

public class CircleFriendAdapter extends BaseRecAdapter<ActiveBean> {


    @Override
    protected void onItemClick(View v, int position) {

    }

    @Override
    protected BaseViewHolder getViewHolder(View itemView) {
        return new CircleFriendHolder(itemView);
    }
    @Override
    protected View getItemView(ViewGroup parent) {
        return Global.inflate(R.layout.view_fragment_friend);
    }
    class CircleFriendHolder extends BaseViewHolder {
        @BindView(R.id.iv_follow_photo)
        ImageView mIvFollowPhoto;
        @BindView(R.id.tv_follow_name)
        TextView mTvFollowName;
        @BindView(R.id.tv_follow_status)
        TextView mTvFollowStatus;
        @BindView(R.id.tv_follow_des)
        TextView mTvFollowDes;
        @BindView(R.id.tv_friend_iphone)
        TextView mTvFriendIphone;
        @BindView(R.id.tv_message_time)
        TextView mTvMessageTime;
        public CircleFriendHolder(View itemView) {
            super(itemView);
        }
        @Override
        public void setData(ActiveBean activeBean, int Position) {

            mTvFollowName.setText(activeBean.author);
            mTvFollowStatus.setText(""+activeBean.objecttype);
            mTvFollowDes.setText(activeBean.message);
            mTvMessageTime.setText(activeBean.pubDate);
        }
    }
}
